import Detail from "./detail.js"
import MyMixin from "./mixin.js"
import "./global-mixin.js"



Vue.config.productionTip = false

var app = new Vue({
    el: '#root',
    
    mixins: [MyMixin],
    
    data: {
        title: 'hello'
    },

    mounted(){
        console.log("----root----");
        console.log("app counted");

        this.handleClick();

        console.log(this.$options.myvar);
    },

    components: {
        Detail,
        MyMixin
    },

    computed:{
        newTitle(){
            return this.title + ' app.'
        }
    },

    methods:{
        handleClick(){
            console.log("app click");
        }
    },

    watch:{
        title(newTitle) {
            console.log(newTitle);
        }
    },

    myvar:"gp"

})

window.app = app